home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
prog
/
dnalib59.arj
/
SCROLL.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-10-27
|
843b
|
40 lines
DECLARE SUB CalcByte(Attr%,LowByte%,HiByte%)
SUB Scroll(Message$,Rev%,Direction%,Row%,Attr%) PUBLIC
CalcByte Attr%,FGround%,BGround%
EndAddress% = Row% * 160
StartAddress% = EndAddress% - 160
DEF SEG = &HB800
ScrollSave$ = PEEK$(StartAddress%,EndAddress%)
COLOR FGround%,BGround%
IF Direction% = 1 THEN
FOR i = 1 TO LEN(Message$) * Rev%
A$ = RIGHT$(Message$,1)
B$ = LEFT$(Message$,LEN(Message$) - 1)
Message$ = A$ + B$
LOCATE Row%,(80 - LEN(Message$))/2,0
PRINT A$;B$;
DELAY .1
NEXT i
ELSE
FOR j = 1 TO LEN(Message$) * Rev%
A$ = LEFT$(Message$,1)
B$ = RIGHT$(Message$,LEN(Message$) - 1)
Message$ = B$ + A$
LOCATE Row%,(80 - LEN(Message$))/2,0
PRINT B$;A$;
DELAY .1
NEXT j
END IF
LOCATE Row%,(80 - LEN(Message$))/2,0
POKE$ StartAddress%,ScrollSave$
DEF SEG
END SUB